import request from '../request.js'

const ctxBase = "/base/permission"

export function add(data) {
    return request.post(ctxBase + "/add", data)
}

export function update(data) {
    return request.post(ctxBase + "/update", data)
}

export function del(data) {
    return request.post(ctxBase + "/del/"+data.id)
}

export function list(data) {
    return request.post(ctxBase + "/list", data)
}

export function tree() {
  return request.post(ctxBase + "/tree")
}

export function clearTree() {
  return request.post(ctxBase + "/clearTree")
}

export default{  
  add, update, del, list, tree, clearTree
}
